pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
   
    fn fib_helper(prev: u32, curr: u32, sum: u32, threshold: u32) -> u32 {
        if curr > threshold {
            return sum;
        }
        
       
        let new_sum = if curr % 2 == 1 {
            sum + curr
        } else {
            sum
        };
        
       
        fib_helper(curr, prev + curr, new_sum, threshold)
    }

   
    fib_helper(0, 1, 0, threshold)
}
